package com.beautify.utils;

import com.beautify.entity.pojo.Posts;
import com.beautify.entity.vo.PostVO;

public class PostVOFactory {

    public static PostVO createPostVO(Posts post) {
        return PostVO.builder()
                .postId(post.getPostId())
                .userId(post.getUserId())
                .username(post.getUsername())
                .imageUrl(post.getImageUrl())
                .createdAt(post.getCreatedAt())
                .updatedAt(post.getUpdatedAt())
                .build();
    }

}
